<%@ page language="java" contentType="text/html; charset=GB18030"
    pageEncoding="GB18030"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
<link rel="stylesheet" href="css/jquery.ui.all.css">
<script src="js/jquery-1.8.2.js"></script>
<script src="js/jquery.ui.core.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.ui.datepicker.js"></script>
<link rel="stylesheet" href="css/demos.css">
<script type="text/javascript" language="JavaScript">
	$(function() {
		$("#datepicker1").datepicker();
	});
	$(function() {
		$("#datepicker2").datepicker();
	});
/*
	function validate() {
		var usernameValue = document.getElementById("usernameId").value;
		var passwordValue = document.getElementById("passwordId").value;
		var repasswordValue = document.getElementById("repasswordId").value;

		if (usernameValue.length == 0) {
			alert("username required");
			return false;
		}

		else if ((usernameValue.length < 6) || usernameValue.length > 12) {
			alert("username should be between 6 and 12");
			return false;
		}

		if (passwordValue.length == 0) {
			alert("password required");
			return false;
		}

		else if (passwordValue.length < 6 || passwordValue.length > 20) {
			alert("password should be between 6 and 12");
			return false;
		}

		if (repasswordValue.length == 0) {
			alert("repassword required");
			return false;
		} else if (repasswordValue.length < 6 || repasswordValue.length > 20) {
			alert("username should be between 6 and 20");
			return false;
		}
		if (passwordValue != repasswordValue) {
			alert("password and repassword should be same");
			return false;
		}
		return true;
	}
	*/
</script>
</head>
<body>
<center>
       <s:text name="adduser"></s:text>
</center>
    
	
	<s:form action="register" namespace="/" theme="simple" onsubmit="return validate()">
		<s:token name="hello"></s:token>
		
		<table align="center" width="60%">
			<tr>
				<td>username</td>
				<td><s:textfield name="username" label="username"
						id="usernameId"></s:textfield></td>
						<td>
						<s:fielderror cssStyle="color: red">
						<s:param>username</s:param>
	</s:fielderror>
	</td>
			</tr>
			<tr>
				<td>password</td>
				<td><s:password name="password" label="password"
						id="passwordId"></s:password></td>
						<td>
						<s:fielderror cssStyle="color: red">
						<s:param>password</s:param>
	</s:fielderror>
	</td>
			</tr>
			<tr>
				<td>repassword</td>
				<td><s:password name="repassword" label="repassword"
						id="repasswordId"></s:password></td>
						<td>
						<s:fielderror cssStyle="color: red">
						<s:param>repassword</s:param>
	</s:fielderror>
	</td>
			</tr>
			<tr>
				<td>age</td>
				<td><s:textfield name="age" label="age"></s:textfield></td>
			</tr>
			<tr>
				<td>birthday</td>
				<s:date name="birthday" format="MM/dd/yyyy" var="birthday" />
				<td><s:textfield name="birthday" label="birthday"
						id="datepicker1"></s:textfield></td>
						<td>
						<s:fielderror cssStyle="color: red">
						<s:param>birthday</s:param>
	</s:fielderror>
	</td>
			</tr>
			<tr>
				<td>graudation</td>
				<s:date name="graduation" format="MM/dd/yyyy" var="graduation" />
				<td><s:textfield name="graduation" label="graduation"
						id="datepicker2"></s:textfield></td>
						<td>
						<s:fielderror cssStyle="color: red">
						<s:param>graduation</s:param>
	</s:fielderror>
	</td>
			</tr>
			<tr>
				<td></td>
				<td><s:submit label="submit"></s:submit> <s:reset label="reset"></s:reset>
				</td>
			</tr>
		</table>
	</s:form>
</body>
</html>